package com.xiaozhameng.jsp.module.websocket;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * 功能描述：跳转页面
 *
 * @author: xiaozhameng
 * @date: 2021/1/21 5:29 下午
 */
@Controller
public class WebSocketController {
    @Autowired
    private WebSocketServer webSocketServer;

    @RequestMapping("/websocket")
    public String index() {
        return "modules/views/websocket/websocket";
    }

    @GetMapping("/webSocket")
    public ModelAndView socket() {
        ModelAndView mav = new ModelAndView("/webSocket");
        // mav.addObject("userId", userId);
        return mav;
    }
}
